package com.weishaoying.thrift.impl;

import com.weishaoying.thrift.QryResult;
import com.weishaoying.thrift.TestQry;
import org.apache.thrift.TException;

/**
 * @author WeiShaoying
 * @date 2018/9/10
 */
public class QueryImpl implements TestQry.Iface {

    @Override
    public QryResult qryTest(int qryCode) throws TException {
        QryResult result = new QryResult();
        if (qryCode == 1) {
            result.code = 1;
            result.msg = "success";
        } else {
            result.code = 0;
            result.msg = "fail";
        }
        return result;
    }
}
